package com.example.demo.Services;

import com.example.demo.Model.Book;
import com.example.demo.Repository.BookRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.List;

@Service
public class BookService {
    @Autowired
    BookRepository bookBookRepository;
    @Transactional
    public List<Book> getByReader(String reader) {
        return bookBookRepository.findByReader(reader);
    }
}
